﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Speech.Synthesis;
using System.Text;
using System.Threading.Tasks;

namespace Mohe.Scada.Util.Helper
{
    public class SpeechHelper
    {
        private static readonly SpeechSynthesizer speech = new();

        /// <summary>
        /// 播报语音
        /// </summary>
        /// <param name="msg"></param>
        public static void Speak(string msg)
        {
            speech.SpeakAsyncCancelAll();
            speech.SpeakAsync(msg);
        }
    }
}
